home *** CD-ROM | disk | FTP | other *** search
/ Developer Source 4 / developer source - volume 4.iso / unixr / jun94 / rago11.gif < prev   
Graphics Interchange Format  |  1996-01-05  |  411KB  |  805x1103  |  8-bit (156 colors)
Labels: text | screenshot | number | font | parallel | line
OCR: XDR Data Types FIGURE 1 Type Representation Sample Declaration Intege 0 123 int x MSB LSB Unsigned integer 0 123 unsigned int x; MSB LSE Enumeration 0 123 enum { a = 1, b = 2 } x; MSB LSB Boolean 0 123 bocl x; MSB LSB Hyper integer and 0 1 234567 hyper int x; unsigned hyper integer MSB LSB unsigned hyper int y; Floating point 0 123 float x: A 1-bit sign 8-bit exponent 23-bit fraction Double precision 0 1234567 double x; Floating point 52-bit fraction 1-bit sign 11-bit exponent Fixed-length 0 1 - n-1. nad opaque x[n]: opaque data < n bytes > Variable-length 0 1 |2 |3 |0 |1 0-1 opaque data pad opaque x<>; < size ><n bytes -> String 0 |1 2|3 01 n-1 pad string x< >; < size ->< n bytes > Fixed-length el. 0 el. 0 array : el. n-1 type-name x[n]; (each element can be a different size, but all are multiples of 4 bytes) Variable-length 0 123 el. 0 : - : el. n-1 type-name x<>; array - size > Structure comp. A comp. B struct { (each component is a multiple of 4 bytes) component A, component B; Discriminated 0 |123 implied arm union switch (disc .- decl.) { case discriminant-value-A: discriminant 1< 4-byte multiple >> arm-declaration-A; case discriminant-value-B: arm-declaration-B; default: default-declaration; Void ->< void 0 bytes (no data) Constant doesn't declare data) const x = 1; Typedef (doesn't declare data) typedef enum { FALSE=0, TRUE=1 bool; Optional data (special type of union used for type-name *x; recursive data structures)